package org.cainiao.basic.collection;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.TreeMap;

/**
 * <br />
 * <p>
 * Author: Cai Niao(wdhlzd@163.com)<br />
 */
public class CollectionTest {

    public static void main(String[] args) {
        TreeMap<String, String> treeMap = new TreeMap<>();

        // Collections.binarySearch() 中用到了 RandomAccess
        List<Integer> list = new ArrayList<>();
        list.add(5);
        list.add(10);
        int index = Collections.binarySearch(list, 5);
    }

}
